package com.candy.test;
import com.candy.service.AccountService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations= {"classpath:applicationContext.xml"})
public class Client3 {
    @Autowired
    JdbcTemplate jdbcTemplate;

    @Autowired
    AccountService accountServiceImpl;
    @Test
    public  void test03() {
        accountServiceImpl.save("tom","lily",100);

    }

    @Test
    public  void test02() {

        jdbcTemplate.update("UPDATE employees SET name='赵五' where employee_id=6");
    }

    @Test
    public  void test01() {

        jdbcTemplate.update("UPDATE employees SET name='赵五' where employee_id=6");
    }



}
